﻿<%@ Page Language="C#" MasterPageFile="~/SimplePMT.Master" AutoEventWireup="true" CodeBehind="QualityAssurance.aspx.cs" Inherits="SimplePMT.QualityAssurance" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent">

    <table width="100%" cellpadding=3>
        <tr>
            <td style="white-space:nowrap;color:#ffffff" bgcolor="#869AAE"><b>Quality Assurance</b></td>
        </tr>
        <tr>
            <td style="border:1px solid #6893cf;" valign=top bgcolor="#ffffff">
            
                <table width=90% align=center>
                    <tr>
                        <td width=30% bgcolor="#CACACA" style="color:#ffffff" align=center><b>Releases</b></td>
                        <td width=70% bgcolor="#CACACA" style="color:#ffffff" align=center><b>Tasks</b></td>
                    </tr>
                    <tr>
                        <td width=30% valign=top style="border:dotted 1px #000000">
                            &nbsp;<br>
                            <table cellspacing=0 border=0 width=100%><%= releaseList.ToString() %></table><br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;
                        </td>
                        <td width=70% valign=top style="border:dotted 1px #000000">
                            &nbsp;<br>
                            <div id="taskList">
                            
                            </div>
                        </td>
                    </tr>
                </table>
               
            </td>
        </tr>
        
    </table>
    </p>
    <script>
        var oldtrid = '';
        function checkRollOver(ro, id) {
            if (ro && id != oldtrid) {
                document.getElementById(id).className = 'highlightRow';
            } else if (!ro && id != oldtrid) {
                document.getElementById(id).className = '';
            }
        }
        function getTasks(rid, trid, pname) {
            if (oldtrid != '') {
                document.getElementById(oldtrid).className = '';
                oldtrid = trid;
                document.getElementById(trid).className='highlightRow';
            } else {
                oldtrid = trid;
                document.getElementById(trid).className='highlightRow';
            }
            SimplePMT.QualityAssurance.GetReleaseTasks(rid, pname, function(response) {
                if (response.error != null) {
                    alert(response.error.Message);
                } else {
                    document.getElementById('taskList').innerHTML = response.value;
                }
            });
        }
        
        function openQAReport(reportId) {
             openModal('QAReport.aspx?id='+ reportId, 'SimplePMT - QA Report');
        }
        
        function newQAReport(releaseId) {
            SimplePMT.QualityAssurance.CreateQAReport(releaseId, function(response) {
                if (response.error != null) {
                    alert(response.error.Message);
                } else {
                    openQAReport(response.value);
                }
            });
        }
    </script>
</asp:Content>